[JAVA]Int to String COmmand

Posted by Jack. on Stack Overflow See other posts from Stack Overflow or by Jack.
Published on 2013-07-01T04:19:10Z Indexed on 2013/07/01 4:20 UTC
Read the original article Hit count: 99

Filed under:

I'm trying to make a piece of code that will yell out anything I input.

So the command is 'yell'

I want to be able to type 'yell (whatever i want here)' and it will yell it out. I've been able to do it with numbers but I can't do it with a String. So how can I go about that?

int x = Integer.valueOf(cmd[1]);
n.setNextForceTalk(new ForceTalk("Number: " + x));

That piece of code allows me to type 'yell (number)' and it will come out with whatever number I type. But how can I do it with text.

© Stack Overflow or respective owner

Related posts about java